﻿<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/Site.Master" CodeBehind="list.aspx.vb" Inherits="wsccprototype.list" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <p>
        <asp:Label ID="Label1" runat="server" Text="Click on the Model number to view details page!!"></asp:Label>
    <br />
</p>
<p>
    
    <asp:GridView ID="GridView1" runat="server" AllowSorting="True" 
        AutoGenerateColumns="False" DataSourceID="mercedesbenzdatasource" 
        CssClass="datagrid" Height="20px" Width="377px">
        <Columns>
            <asp:HyperLinkField DataNavigateUrlFields="ID" 
                DataNavigateUrlFormatString="details.aspx?ID={0}" DataTextField="model" 
                HeaderText="Model" SortExpression="model" />
            <asp:BoundField DataField="body_type" HeaderText="body_type" 
                SortExpression="body_type" />
            <asp:ImageField DataImageUrlField="car_picture" HeaderText="Thumbnail">
                <ControlStyle CssClass="carpictures" />
            </asp:ImageField>
        </Columns>
    </asp:GridView>
    <asp:SqlDataSource ID="mercedesbenzdatasource" runat="server" 
        ConnectionString="<%$ ConnectionStrings:mercedesbenzconnectionstring %>" 
        ProviderName="<%$ ConnectionStrings:mercedesbenzconnectionstring.ProviderName %>" 
        
        SelectCommand="SELECT [model], [production_year], [body_type], [price], [features], [official_site_link], [car_picture], [michelin_stars], [ID] FROM [cars] ORDER BY [ID] DESC">
    </asp:SqlDataSource>
</p>
<p>
    show me these types of cars</p>
<p>
    <asp:GridView ID="GridView2" runat="server" AutoGenerateColumns="False" 
        DataSourceID="SqlDataSource1">
        <Columns>
            <asp:HyperLinkField DataNavigateUrlFields="tagname" 
                DataNavigateUrlFormatString="carsbytags.aspx?tagname={0}" 
                DataTextField="tagname" />
        </Columns>
    </asp:GridView>
    <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
        ConnectionString="<%$ ConnectionStrings:mercedesbenzconnectionstring %>" 
        ProviderName="<%$ ConnectionStrings:mercedesbenzconnectionstring.ProviderName %>" 
        SelectCommand="SELECT [tagname] FROM [tags]"></asp:SqlDataSource>
</p>
<p>
    <asp:TextBox ID="TextBox1" runat="server" Width="203px"></asp:TextBox>
    <asp:Button ID="Button1" runat="server" Text="Search" />
</p>
<p>
</p>
<p>
</p>
<p>
</p>
<p>
</p>
</asp:Content>
